<?php if (!UserAccess::checkLoggedin()) { ?>

        <div data-role="content">	
            <p>Login to Picks</p>
            
            <form id="LoginFormMobil" action="<?php echo URL; ?>login/login" method="post" rel="external"> 
               <p>Username: <input type="text" name="username" /></p>
                <p>Password: <input type="password" name="password"></p>
                <input type="submit" value="Login" /> 
            </form>
            
        </div><!-- /content -->

<?php } else { ?>
    Logged in <br />
<?php } ?>

    <h2>Scores</h2>
    <table id="scores" >
        <tr class="HeadLine"><td>User</td><td>Score</td></tr>
           <?php
           $ScoreData = $this->model->PrintHighScoreTable();
                   
           $rowcount = 0;
           
            while ($data = $ScoreData->fetch()) {

            $username = $data['username'];
            $score = $data['score'];
            $rowcount += 1;
            if ($rowcount % 2 == 1)
                echo"<tr class=\"alt\">\n";
            else
                echo"<tr>\n";
            echo"<td>$username</td>\n";
            echo"<td>$score</td>\n";
            echo"</tr>\n";
        }

           ?>
    </table>
